<?php
/**
 * Description of LoginForm
 *
 * @author fusq
 */

require_once BaseUtil::getModulePath("base")  .  '/forms/BaseForm.php';

class LoginForm extends BaseForm {
    
    public function __construct ()
    {
        parent::__construct();
        $this->setAction(HttpUtil::getUrl("admin", "sublogin"));

        // username
        $name = new Zend_Form_Element_Text('email');
        $name->setLabel($this->translate->_('userEmail'));
        $name->addFilter("StringTrim");
        $name->setRequired(true);
        // passwrod
        $password = new Zend_Form_Element_Password('password');
        $password->setLabel($this->translate->_('password'));
        $password->addFilter("StringTrim");
        $password->setRequired(true);

        $this->addElements(array($name,$password));

        $this->setElementDecorators(array(
            'ViewHelper',
            array(array('div' => 'HtmlTag'), array('tag' => 'div',"class" => "form_element")),
        ));
    }
}
